package dao;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.ejb.Stateless;

import model.Schedule;
import model.Train;


@Stateless
public class ScheduleDAO extends GenericDAO<Schedule> {
	public List<Schedule> findIsSchedulePossible(Train train, Date begin, Date end) {
		Map<String, Object> parameters = new HashMap<String, Object>();
		parameters.put("tr", train);
		parameters.put("dateBegin", begin);
		parameters.put("dateEnd", end);
		return super.findManyResults(Schedule.FIND_IS_SCHEDULE_POSSIBLE, parameters);
	}
	
	public ScheduleDAO() {
		super(Schedule.class);
	}
}
